<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
		<link rel="stylesheet" type="text/css" href="__TMPL__/public/order/css/orderdetail.css"/>
		<script type="text/javascript" src="__TMPL__/public/assets/js/jquery.min.js"></script>
		<script type="text/javascript" src="__TMPL__/public/assets/js/layer/mobile/layer.js"></script>
		<script type="text/javascript" src="__TMPL__/public/assets/js/order.js"></script>

		<title>订单详情</title>
	</head>
	<body>
		<header> 
		<div class="content"  style="border-bottom: 1px solid #d7d7d75e;">
			 <a href="javascript:history.back(-1);"></a>
            <a>订单</a>
            <a href="javascript:;"></a>
		</div> 
		</header> 
		<div class="state">
			<span>{:cmf_get_order_status($orders_info.order_status)}</span>
		</div>

		<div class="address">
		<p><span class="name">{$orders_info.receiver_name}</span><span class="phone">{$orders_info.receiver_mobile}</span></p>
		<p><span class="ads">{:get_city_info($orders_info['receiver_province'],$orders_info['receiver_city'],$orders_info['receiver_district'])}{$orders_info.receiver_address}</span></p>
		</div>
		<div class="shops">
            <foreach name="orders_info['order_goods']" item="vo">
                <php>$photo=json_decode($vo['goods_picture'],true);</php>
			<div onclick="location.href='{:url(\'shop/good/index\',array(\'id\'=>$vo[\'goods_id\']))}'">
				<img src="{:cmf_get_image_preview_url($photo.thumbnail)}"/>
				<p>{$vo.goods_name}</p>
				<p><span>￥<b>{$vo.price}</b>+{$vo.point}积分</span><span>×{$vo.num}</span></p>
			</div>
            </foreach>
		</div>    
		<notempty name="orders_info['shipping']">
			<php>
				$Traces=json_decode($orders_info['shipping']['shipping_info'],true);
			</php>
			<div class="shipping">
				<div><span>物流信息</span></div>
              <php>
                if($Traces['resultcode']=='200'){
                $Traces=array_reverse($Traces['result']['list']);
              </php>
				<foreach name="Traces" item="vo">
					<eq name="key" value="0">
						<div class="first wuliu_order"><span>   {$vo.datetime}：&nbsp;{$vo.remark}</span></div>
					</eq>
					<neq name="key" value="0">
						<div class="other"><span>   {$vo.datetime}：&nbsp;{$vo.remark}</span></div>
					</neq>
				</foreach>
                <php>}else{</php>
             		 <div class="first wuliu_order"><span> 物流信息获取失败  </span></div>
               <php>}</php>
			</div>
		</notempty>
		<div class="calculate">
			<div><span>运费</span><span>￥{$orders_info.shipping_money}</span></div>
			<div><span>积分抵扣</span><span>-{$orders_info.pay_point}</span></div>
            <php>
                $goods_money=$orders_info['goods_money']+$orders_info['shipping_money'];
                $goods_money= number_format($goods_money, 2, '.', '');
            </php>
			<div><span>应付</span><span style="color: red;">￥{$goods_money}+{$orders_info.goods_point}积分</span></div>
			<div><span>实付</span><span style="color: red;">￥{$orders_info.pay_money}+{$orders_info.pay_point}积分</span></div>
			<div><span>订单号</span><span>{$orders_info.order_no}</span></div>
          <notempty name="orders_info['shipping_code']">
            <div><span>物流单号</span><span>{$orders_info['shipping_code']}</span></div>
            </notempty>
        
			<div class="submit">
				<eq name="orders_info['order_status']" value="0">
					<i class="do_pay" onclick="location.href='{:url(\'shop/order/pay\',array(\'order_no\'=>$orders_info[\'order_no\']))}'">去付款</i>
					<i class="close_order" data="{$orders_info.order_id}">取消订单</i>
				</eq>
				<eq name="orders_info['order_status']" value="1">
					<i style="display: none"></i>
					<i>待发货</i>
				</eq>
				<eq name="orders_info['order_status']" value="2">
					<i class="yes_order" data="{$orders_info.order_id}">确认收货</i>
					<i  class=" wuliu_order" >查看物流</i>
				</eq>
				<eq name="orders_info['order_status']" value="3">
					<i class="return_order" onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">退换货</i>
					<i>已收货</i>
				</eq>
				<eq name="orders_info['order_status']" value="4">
					<i style="display: none"></i>
					<i>订单完成</i>
				</eq>
				<eq name="orders_info['order_status']" value="5">
					<i style="display: none"></i>
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">退换货审核中</i>
				</eq>
				<eq name="orders_info['order_status']" value="6">
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">审核通过，待用户发货</i>
				</eq>
				<eq name="orders_info['order_status']" value="7">
					<i style="display: none"></i>
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">审核拒绝</i>
				</eq>
				<eq name="orders_info['order_status']" value="8">
					<i style="display: none"></i>
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">用户已发货</i>
				</eq>
				<eq name="orders_info['order_status']" value="9">
					<i style="display: none"></i>
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">商家已收货</i>
				</eq>
				<eq name="orders_info['order_status']" value="10">
					<i style="display: none"></i>
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">卖家发货</i>
				</eq>
				<eq name="orders_info['order_status']" value="11">
					<i style="display: none"></i>
					<i onclick="location.href='{:url(\'user/order/return_order\',array(\'id\'=>$orders_info[\'order_id\']))}'">买家收货，退换货完成</i>
				</eq>
              <eq name="orders_info['order_status']" value="12">
					<i style="display: none"></i>
					<i>退货完成</i>
				</eq>
				<eq name="orders_info['order_status']" value="13">
					<i style="display: none"></i>
					<i>订单结算</i>
				</eq>

			</div>
		</div>
	</body>
</html>
